#include "widget.h"
#include "ui_widget.h"
#include "QDebug"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    ui->comboBox->setEditable(true);
    ui->spinBox->setMinimum(1);
    ui->spinBox->setMaximum(3);
    ui->spinBox->setValue(1);

    ui->comboBox_3->addItem("鸡腿堡");
    ui->comboBox_3->addItem("牛肉煲");
    ui->comboBox_3->addItem("鳕鱼堡");

    ui->comboBox_4->addItem("薯条");
    ui->comboBox_4->addItem("鸡翅");
    ui->comboBox_4->addItem("鸡米花");

    ui->comboBox_5->addItem("可乐");
    ui->comboBox_5->addItem("雪碧");

    ui->pushButton_2->setText("确认");

}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    qDebug() << ui->comboBox->currentText() << " " << ui->comboBox_2->currentText();
}


void Widget::on_pushButton_2_clicked()
{
    QString s = ui->comboBox_3->currentText() + " " + ui->comboBox_4->currentText()
            + " "+ ui->comboBox_5->currentText();
    qDebug() << s;

}
